/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package drivetrain;
import com.jme3.bullet.control.VehicleControl;

/**
 * An abstact propulsionunit controllable by a PropulsionController. An abstraction for custom propulsionunits.
 * @see InternalCombustionPropulsioUnit
 * @author Vekjeft
 */
public abstract class PropulsionUnit{
    /**
     * The controller controlling this PropulsionUnit
     */
    protected PropulsionController propulsionController;
    /**
     * The vehicle for this PropulsionUnit
     */
    protected VehicleControl vehicleControl;
    /**
     * The current throttlevalue
     */
    protected float throttleValue = 0;
    /**
     * Is accelerating farward
     */
    protected boolean accelerate = false;
    /**
     * Is accelerating backward
     */
    protected boolean isReversing = false;    
 
    /**
     * 
     * @param vehicleControl The vehicle for this PropulsionUnit
     */
    public PropulsionUnit(VehicleControl vehicleControl){
    this.vehicleControl = vehicleControl;
    }
    
    /**
     * 
     * @param value a throttlevalue
     * @param accelerate is accelerating or decelerating
     */
    public void activate(float value, boolean accelerate){  // Altered by PropulsionController
    }
    /**
     * 
     * @param t
     */
    public void update(float t){                          // Updated from physicsTickListener
    }
}
